home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 2
/
Gold Medal Software Volume 2 (Gold Medal) (1994).iso
/
prog
/
pclcjs.arj
/
FILES.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-04-29
|
471b
|
33 lines
#include <dos.h>
#include <stdio.h>
#include "cjslib.h"
int get_files()
{
FPTR farptr;
union REGS inregs,outregs;
struct SREGS segregs;
unsigned count=0;
inregs.h.ah = 0x52;
int86x(0x21,&inregs,&outregs,&segregs);
farptr = *(FPTR far *)MK_FP(segregs.es,outregs.x.bx+4);
do {
count += *(unsigned far *) (farptr+4);
farptr = *(FPTR far *)farptr;
}
while (0xFFFF != (unsigned)(farptr));
return(count);
}